Conversation
Agent-Logs-Url: https://github.com/getsentry/sentry-javascript/sessions/279338b3-5e56-4760-9345-e9c86ecc3896 Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
…edup Agent-Logs-Url: https://github.com/getsentry/sentry-javascript/sessions/ebddacbf-8329-422a-8199-8b6914cd3645 Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
…nder Agent-Logs-Url: https://github.com/getsentry/sentry-javascript/sessions/ed7a9990-d8c7-47ed-b4e4-14c9a50cfac2 Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
Agent-Logs-Url: https://github.com/getsentry/sentry-javascript/sessions/20ea6b6f-d865-4d7b-aff6-3a6f432844d2 Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
…r.mjs Agent-Logs-Url: https://github.com/getsentry/sentry-javascript/sessions/0e6a9f7f-93f3-4278-8456-15bfc8715e39 Co-authored-by: Lms24 <8420481+Lms24@users.noreply.github.com>
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Core
Other
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
Filter individual @mentions via outside-collaborator list (no read:org PAT). Tighten GITHUB_TOKEN permissions; skip workflow_dispatch on forks; warn on timeline mismatches. Co-Authored-By: Claude <noreply@anthropic.com> Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 91d8c62. Configure here.
|
|
||
| const pendingReviewers = requested.reviewers; // individual users | ||
| const pendingTeams = requested.teams; // team reviewers | ||
| if (pendingReviewers.length === 0 && pendingTeams.length === 0) continue; |
There was a problem hiding this comment.
Wrong property name crashes script for all PRs
High Severity
The GitHub REST API response from pulls.listRequestedReviewers returns individual reviewers under the users property, not reviewers. Accessing requested.reviewers yields undefined, so pendingReviewers.length on the next line throws a TypeError, crashing the entire script for every PR that reaches this point.
Reviewed by Cursor Bugbot for commit 91d8c62. Configure here.
| const pendingReviewers = requested.reviewers; // individual users | ||
| const pendingTeams = requested.teams; // team reviewers | ||
| if (pendingReviewers.length === 0 && pendingTeams.length === 0) continue; |
There was a problem hiding this comment.
Bug: The code accesses requested.reviewers to get pending reviewers, but the GitHub API response object contains a users field instead, causing a crash.
Severity: CRITICAL
Suggested Fix
On line 177, change the property access from requested.reviewers to requested.users. The line should be const pendingReviewers = requested.users;.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: scripts/pr-review-reminder.mjs#L177-L179
Potential issue: The `github.rest.pulls.listRequestedReviewers()` method returns an
object with `users` and `teams` fields, as per the GitHub API documentation. The code
incorrectly attempts to access `requested.reviewers` on line 177, which results in the
`pendingReviewers` variable being `undefined`. Subsequently, line 179 attempts to access
`pendingReviewers.length`, which will throw a `TypeError`. This will cause the workflow
to crash for any pull request that has pending individual reviewers, which is a primary
use case for this script.
Did we get this right? 👍 / 👎 to inform future reviews.


Adds
.github/workflows/pr-review-reminder.ymlandscripts/pr-review-reminder.mjs.workflow_dispatch.Botusers.review_requestedor last reminder for that login/team; weekends excluded; US/CA/AT holidays via Nager.Date (fallback: weekdays only if API fails).github-actions[bot]comments.listCollaboratorsaffiliation: outside); on API failure, skip individuals (warn), teams unchanged.team-javascript-sdks.review_requestedtimeline event.workflow_dispatchfor forks; schedule always runs on default branch.GITHUB_TOKENpermissions:contents: read,issues: write,pull-requests: read.